package com.zcah.weixinspider.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collection;


/**
 * Created by Administrator on 2017/3/1 14:57.
 */
@Service
public class IRedisService {

    @Resource
    private ListOperations<String, String> listOperations;


    /**
     * 添加
     *
     * @param key   key
     * @param value 对象
     */
    public long put(String key, String value) {
        return listOperations.leftPush(key, value);
    }
}